<?php view('_header', array('title' => $title)) ?>

<script src="public/js/jquery.ui.core.js"></script>
<script src="public/js/jquery.ui.widget.js"></script>
<script src="public/js/jquery.ui.mouse.js"></script>
<script src="public/js/jquery.ui.draggable.js"></script>
<script src="public/js/jquery.ui.droppable.js"></script>
<script src="public/js/jquery.ui.sortable.js"></script>
<script src="public/js/jquery.ui.accordion.js"></script>
<script src="public/js/jquery.bgiframe-2.1.2.js"></script>
<script src="public/js/jquery.ui.button.js"></script>
<script src="public/js/jquery.ui.position.js"></script>
<script src="public/js/jquery.ui.resizable.js"></script>
<script src="public/js/jquery.ui.dialog.js"></script>
<script src="public/js/jquery.effects.core.js"></script>
<script src="public/js/jquery.dock.js"></script>

<style>
	h1 { padding: .2em; margin: 0; font-size: 12px;}
	#renyuan { float:left; width: 150px; margin-right: 2em; }
	#fuzeren { width: 200px; float: left; }
	#fuzeren ol { margin: 0; padding: 1em 0 1em 3em; }

	label, input { display:block; }
	input.text { margin-bottom:12px; width:95%; padding: .4em; }
	fieldset { padding:0; border:0; margin-top:25px; }
	div#users-contain { width: 800px; margin: 20px 0; }
	div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
	div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
	.ui-dialog .ui-state-error { padding: .3em; }
	.validateTips { border: 1px solid transparent; padding: 0.3em; }
</style>

<script>
	$(function() {
		$( ".del" ).click(function() {
			var inid =  $(this).parents().parents().parents().attr("id");
			$.post("index.php?c=pj&a=del",{pid:inid});
			location.replace(location.href);
		});
	});	
	
</script>
<script type="text/javascript">
	var confObject = {
		iconMinSide : 60,
		iconMaxSide : 90,
		distAttDock : 100,
		coefAttDock : 2,	
		veloOutDock : 500,
		valign: 'bottom'
	}
	jQuery(function() {
		jQuery("#Bar").addDockEffect(confObject);
	});
</script>
<script type="text/javascript">
	$(document).ready(function(){
		var docked = 0;
            
		$("#dock li ul").height($(window).height());
            
		$("#dock .dock").click(function(){
			$(this).parent().parent().addClass("docked").removeClass("free");
                
			docked += 1;
			var dockH = ($(window).height()) / docked
			var dockT = 0;               
                
			$("#dock li ul.docked").each(function(){
				$(this).height(dockH).css("top", dockT + "px");
				dockT += dockH;
			});
			$(this).parent().find(".undock").show();
			$(this).hide();
                
			if (docked > 0)
				$("#content").css("margin-left","250px");
			else
				$("#content").css("margin-left", "60px");
		});
            
		$("#dock .undock").click(function(){
			$(this).parent().parent().addClass("free").removeClass("docked")
			.animate({left:"-180px"}, 200).height($(window).height()).css("top", "0px");
                
			docked = docked - 1;
			var dockH = ($(window).height()) / docked
			var dockT = 0;               
                
			$("#dock li ul.docked").each(function(){
				$(this).height(dockH).css("top", dockT + "px");
				dockT += dockH;
			});
			$(this).parent().find(".dock").show();
			$(this).hide();
                
			if (docked > 0)
				$("#content").css("margin-left", "250px");
			else
				$("#content").css("margin-left", "60px");
		});

		$("#dock li").hover(function(){
			$(this).find("ul").animate({left:"40px"}, 200);
		}, function(){
			$(this).find("ul.free").animate({left:"-180px"}, 200);
		});
	}); 
</script>

</head>
<body>

	<div id="Bar">
		<a href="index.php?c=home&a=QQ" name="腾讯" title="腾讯">
			<img src="public/img/QQ_60.png" alt="腾讯" border="0" />
		</a>
		<a href="index.php?c=home&a=FB_FAN" name="FB繁体" title="FB繁体">
			<img src="public/img/FB_60.jpg" alt="FB繁体" border="0" />
		</a>
		<a href="index.php?c=home&a=FB_TAI" name="FB泰语" title="FB泰语">
			<img src="public/img/FB_60.jpg" alt="FB泰语" border="0" />
		</a>
		<a href="index.php?c=home&a=MIXI" name="MIXI" title="MIXI">
			<img src="public/img/MIXI_60.gif" alt="MIXI" border="0" />
		</a>
		<a href="index.php?c=home&a=FEIXIN" name="飞信" title="飞信">
			<img src="public/img/feixin_60.jpg" alt="飞信" border="0" />
		</a>
		<a href="index.php?c=pj&a=index" name="本周" title="本周">
			<img src="public/img/KN_60.jpg" alt="本周" border="0" />
		</a>
	</div>
<!--	<ul id="dock">
		<li id="links">
			<ul class="free">
				<li class="header"><a href="#" class="dock">Dock</a><a href="#" class="undock">Undock</a>Links</li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
			</ul>
		</li>
		<li id="files">
			<ul class="free">
				<li class="header"><a href="#" class="dock">Dock</a><a href="#" class="undock">Undock</a>Files</li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
			</ul>
		</li>
		<li id="tools">
			<ul class="free">
				<li class="header"><a href="#" class="dock">Dock</a><a href="#" class="undock">Undock</a>Tools</li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
				<li><a href="#">This is one item</a></li>
			</ul>
		</li>
	</ul>-->

	<div>
		<section role="main" class="page-wrapper">
			<article class="content-box minimizer">
				<div id="" class="">
					<!--			<form class="table-form">-->
					<table id="users" class="">
						<thead>
							<tr class="">
								<th></th>
								<th>编号</th>
								<th>项目</th>
								<th>负责人</th>
								<th>PHP</th>
								<th>AS</th>
								<th>美术</th>
								<th>测试</th>
								<th>送测时间</th>
								<th>上线时间</th>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<?php
							for ($i = 0; $i < count($content); $i++)
							{
								?>
								<tr id="<?php echo $content[$i]->pid; ?>">
									<td>
										<!-- Table actions -->
										<a class="toggle-table-switch tooltip" href="#" title="设置">设置</a>
										<ul class="table-switch">
											<li><a href="#">查看</a></li>
											<li><a href="index.php?c=pj&a=editProject&id=<?php echo $content[$i]->pid ?>">编辑</a></li>
											<li class="del"><a>删除</a></li>
										</ul>
										<!-- /Table actions -->
									</td>
									<td><?php echo $content[$i]->pt . "-" . $content[$i]->code; ?></td>
									<td><?php echo $content[$i]->project; ?></td>			
									<td><?php echo $content[$i]->master; ?></td>			
									<td><?php echo $content[$i]->php; ?></td>
									<td><?php echo $content[$i]->as; ?></td>
									<td><?php echo $content[$i]->design; ?></td>
									<td><?php echo $content[$i]->test; ?></td>
									<td><?php echo date('Y-m-d', strtotime($content[$i]->starttime)); ?></td>
									<td><?php echo date('Y-m-d', strtotime($content[$i]->endtime)); ?></td>
									<td>
										<ul class="actions">
											<li><a class="view tooltip" href="#" title="查看">查看</a></li>
											<li><a class="edit tooltip" href="index.php?c=pj&a=editProject&id=<?php echo $content[$i]->pid ?>" title="编辑">编辑</a></li>
											<li class="del"><a class="delete tooltip" title="删除">删除</a></li>
										</ul>
									</td>
								</tr>
							<?php } ?>
						</tbody>
						<tfoot>
							<tr>
								<th colspan="20">
									<!-- Pagination -->
						<ul class="pagination">
							<li><a class="button gray" href="#">&laquo; first</a></li>
							<li><a class="button gray" href="#">&lt; next</a></li>
							<li class="hellip">&hellip;</li>
							<li><a class="button gray" href="#">5</a></li>
							<li><a class="button gray" href="#">6</a></li>
							<li><a class="button" href="#">7</a></li>
							<li><a class="button gray" href="#">8</a></li>
							<li><a class="button gray" href="#">9</a></li>
							<li class="hellip">&hellip;</li>
							<li><a class="button gray" href="#">prev &gt;</a></li>
							<li><a class="button gray" href="#">last &raquo;</a></li>
						</ul>
						<!-- /Pagination -->
						</th>
						</tr>
						</tfoot>
					</table>
					<!--			</form>-->
				</div>
			</article>
		</section>
	</div><!-- End demo -->





	<?php
	view('_footer')?>